
GUI gui = new GUI(1024,500);
//GUI gui = new GUI(640, 480);
//GUI gui = new GUI(1200, 900);
//GUI gui = new GUI(222, 222);

TPoint start;
TPoint stop;
boolean first = true;

void setup() {
  size(gui.getWidth(), gui.getHeight());
  gui.mainMenu();
}

void draw() {
  gui.draw(mouseX, mouseY);
}


void mouseDragged() {
  if (first) {
    start = new TPoint(mouseX, mouseY);
  }
  first = false;
}

void mouseReleased() {
  first = true;  
  stop = new TPoint(mouseX, mouseY);
  if (start == null) {
    start = new TPoint(mouseX, mouseY);
  }
  gui.mReleased(start, stop);
  gui.click(mouseX, mouseY);
  start = null;
  stop = null;
}



